package com.mapper;

import com.pojo.JiaoLiu_db;
import org.apache.ibatis.annotations.*;

import java.util.Date;
import java.util.List;

@Mapper
public interface JiaoLiuMapper_db {
    List<JiaoLiu_db> list(@Param("stime") String stime,@Param("etime") String etime,@Param("id") Integer id);

    @Select("select * from jiaoliu_db")
    List<JiaoLiu_db> listAll();

    List<JiaoLiu_db> listById(@Param("id") Integer id,@Param("order") Integer order);

    @Insert("insert into jiaoliu_db(j_name,j_title,j_time,j_kid) values (#{jName},#{jTitle},#{jTime},#{jKid})")
    Integer add(JiaoLiu_db jiaoLiuDb);

    @Update("update jiaoliu_db set j_name = #{jName},j_title = #{jTitle},j_time = #{jTime},j_kid = #{jKid} where j_id = #{jId}")
    Integer update(JiaoLiu_db jiaoLiuDb);

    @Delete("delete from jiaoliu_db where j_id = #{jId}")
    Integer del(Integer jId);
}
